<%@ page contentType="text/html;charset=UTF-8"%>

<div class="navbar navbar-inverse navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<a class="btn btn-navbar" data-toggle="collapse"
				data-target=".subnav-collapse"> <span class="icon-bar"></span> <span
				class="icon-bar"></span> <span class="icon-bar"></span>
			</a> <a class="brand" href="#">孜孜不倦</a>
			<div class="nav-collapse subnav-collapse">
				<ul class="nav">
					<shiro:authenticated>
						<li>
							<a href="${ctx}/" <c:if test="${cur == 'home' || cur == null || empty cur}">class="selected"</c:if>>首页</a>
						</li>
						<li>
							<a href="<c:url value="/content/topic/add" />" <c:if test="${cur == 'add'}">class="selected"</c:if>>新增</a>
						</li>
						<li>
							<a href="${ctx}/explore" <c:if test="${cur == 'explore'}">class="selected"</c:if>>浏览</a>
						</li>
						<li>
							<a href="${ctx}/profile/${currentUser.userId}" <c:if test="${cur == 'profile'}">class="selected"</c:if>>Profile</a>
						</li>
						<li>
							<a href="${ctx}/people" <c:if test="${cur == 'people'}">class="selected"</c:if>>People</a>
						</li>
						<li>
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
								<c:choose>
									<c:when test="${currentUser.thumbnailId == null || empty currentUser.thumbnailId}">
										<img src="${ctx}/res/images/default_portrait.png" class="thumb thumb_20" />
									</c:when>
									<c:otherwise>
										<img src="${ctx}/image/${currentUser.thumbnailId}" class="thumb thumb_20" />
									</c:otherwise>
								</c:choose> 
							</a>
							<ul class="dropdown-menu vertical dropdown-index index">
								<li>
									<a href="${ctx}/account/settings/profile">Account Settings</a>
								</li>
								<li>
									<a href="${ctx}/help">Help</a>
								</li>
								<li>
									<a href="${ctx}/logout">Logout</a>
								</li>
							</ul>
						</li>
					</shiro:authenticated>
				</ul>
				<form class="navbar-search pull-left" action="">
					<input type="text" class="search-query span2" placeholder="搜索">
				</form>
				<ul class="nav pull-right">
					<shiro:notAuthenticated>
						<li>
							<a href="${ctx}/" <c:if test="${cur == 'index'}">class="selected"</c:if>>Home</a>
						</li>
						<li>
							<a href="${ctx}/explore" <c:if test="${cur == 'explore'}">class="selected"</c:if>>Explore</a>
						</li>
						<li>
							<a href="${ctx}/people" <c:if test="${cur == 'people'}">class="selected"</c:if>>People</a>
						</li>
						<li>
							<c:choose>
								<c:when test="${cur == 'login'}">
									<a href="${ctx}/signup">注册</a>
								</c:when>
								<c:otherwise>
									<a href="${ctx}/login">登录</a>
								</c:otherwise>
							</c:choose>
						</li>
					</shiro:notAuthenticated>
				</ul>
			</div>
		</div>
	</div>
</div>

<header class="jumbotron subhead" id="overview">
	<div class="container">
		<h1>test</h1>
	</div>
</header>
